package com.yudean.esb.domain.erp;

import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by zenghui on 2015-05-19.
 * desc: mapper to IDS_INS_Danger_Type
 */
public class ErpIdsInsDangerType implements Serializable {
    private static final String TAG = "ErpIdsInsDangerType";
    private String insTypeCode; // Ins_type_code	VARCHAR2(40)	NOT NULL	险种编码
    private String insTypeName; // Ins_type_name	VARCHAR2(100)	NOT NULL	险种名称
    private Date creationDate; // Creation_Date	DATE	Not null	记录创建日期
    private BigDecimal createdBy; // Created_By	NUMBER	Not NULL	创建者ID, 缺省为：-1
    private Date lastUpdateDate; // Last_Update_Date	DATE	Not NULL	本条记录最后更新日期
    private BigDecimal lastUpdatedBy; // Last_Updated_By	NUMBER	NOT NULL	本条记录最后更新者ID
    private String attribute1; // Attribute1	VARCHAR2(240)
    private String attribute2; // Attribute2	VARCHAR2(240)
    private String attribute3; // Attribute3	VARCHAR2(240)
    private String attribute4; // Attribute4	VARCHAR2(240)
    private String attribute5; // Attribute5	VARCHAR2(240)

    @Override
    public String toString() {
        return "ErpIdsInsDangerType{" +
                "insTypeCode='" + insTypeCode + '\'' +
                ", insTypeName='" + insTypeName + '\'' +
                ", creationDate=" + creationDate +
                ", createdBy=" + createdBy +
                ", lastUpdateDate=" + lastUpdateDate +
                ", lastUpdatedBy=" + lastUpdatedBy +
                ", attribute1='" + attribute1 + '\'' +
                ", attribute2='" + attribute2 + '\'' +
                ", attribute3='" + attribute3 + '\'' +
                ", attribute4='" + attribute4 + '\'' +
                ", attribute5='" + attribute5 + '\'' +
                '}';
    }

    public String getInsTypeCode() {
        return insTypeCode;
    }

    public void setInsTypeCode(String insTypeCode) {
        this.insTypeCode = insTypeCode;
    }

    public String getInsTypeName() {
        return insTypeName;
    }

    public void setInsTypeName(String insTypeName) {
        this.insTypeName = insTypeName;
    }

    public Date getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }

    public BigDecimal getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(BigDecimal createdBy) {
        this.createdBy = createdBy;
    }

    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public BigDecimal getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(BigDecimal lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public String getAttribute1() {
        return attribute1;
    }

    public void setAttribute1(String attribute1) {
        this.attribute1 = attribute1;
    }

    public String getAttribute2() {
        return attribute2;
    }

    public void setAttribute2(String attribute2) {
        this.attribute2 = attribute2;
    }

    public String getAttribute3() {
        return attribute3;
    }

    public void setAttribute3(String attribute3) {
        this.attribute3 = attribute3;
    }

    public String getAttribute4() {
        return attribute4;
    }

    public void setAttribute4(String attribute4) {
        this.attribute4 = attribute4;
    }

    public String getAttribute5() {
        return attribute5;
    }

    public void setAttribute5(String attribute5) {
        this.attribute5 = attribute5;
    }

    public boolean validateNull() {
        // 验证数据库非空字段
        if (StringUtils.isBlank(this.insTypeCode)) {
            return false;
        }
        if (StringUtils.isBlank(this.insTypeName)) {
            return false;
        }
        if (null == this.creationDate) {
            return false;
        }
        if (null == this.lastUpdateDate) {
            return false;
        }
        if (null == this.createdBy) {
            return false;
        }
        if (null == this.lastUpdatedBy) {
            return false;
        }
        return true;

    }

}
